import {createRouter,createWebHashHistory} from "vue-router";
// 创建路由规则
const routes = [
    {
        path:'/',
        name: '/',
        redirect:'/index',
    },
    {
        path: '/index',
        name: 'default',
        component: () => import('../pages/index/index.vue'),

    },
    {
        name: 'index',
        path: '/index/:userId/:hashCode',
        component: () => import('../pages/index/index.vue'),
    },
    {
        path: '/login',
        name: 'login',
        component: () => import('../pages/login/login.vue')
    }
]
// 创建路由实例
const router = createRouter({
    history:createWebHashHistory(),
    routes,
    base:'/BlindBox/'
});

router.beforeEach((to, from, next) => {

    next()
})


export default router;
// 创建登陆组件
// 指定出口
